<% layout('/layout/default.html', {title: '流程文件部署', libs: ['validate','icheck']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa fa-pencil-square-o"></i> 流程文件部署
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<form id="inputForm" enctype="multipart/form-data" action="${ctx}/act/process/deploy" method="post" class="form-horizontal">
			<div class="box-body">
				
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">流程分类：</i>
							</label>
							<div class="col-sm-8">
								<#form:select path="category" name="label" data="getDictList:act_category" class="form-control required" />
							</div>
						</div>
					</div>
					
				</div>
				
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> 流程文件：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<input type="file" id="file" name="file" class=" required"/>
								<span class="help-inline">支持文件格式：zip、bar、bpmn、bpmn20.xml</span>
							</div>
						</div>
					</div>
				</div>
				
			</div>
			
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('act:process:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 执行部署</button>
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="window.parent.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<% } %>

<script type="text/javascript">
	$("#inputForm").validate({
		submitHandler: function(form){
			js.ajaxSubmitForm($(form), function(data){
				js.showMessage(data.message);
				/* if(data.result == 'true'){
					window.parent.closeCurrentTabPage(window.parent.refreshTab);
				} */
			});
	    }
	});
</script>


